using Unity.Burst;
using Unity.Entities;
using Unity.Profiling;

namespace DOTS.DOD.LESSON4
{
    [BurstCompile]
    [UpdateInGroup(typeof(WaveCubeWithDotsSystemGroup))]
    [UpdateAfter(typeof(WaveCubeGenerateSystem))]
    public partial struct WaveCubeMoveSystem : ISystem
    {
        static readonly ProfilerMarker mProfilerMaker = new ProfilerMarker("WaveCubeWithDots");

        [BurstCompile]
        public void OnUpdate(ref SystemState state)
        {
            using (mProfilerMaker.Auto())
            {
                WaveCubeEntityJob job = new WaveCubeEntityJob()
                {
                    ElapsedTime = (float) SystemAPI.Time.ElapsedTime,
                };
                //job.ScheduleParallel();
            }
        }
    }
}